package org.shop.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.shop.dao.PostInfoMapper;
import org.shop.entity.PostInfo;
import org.shop.service.PostInfoService;
import org.shop.service.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class PostInfoServiceImpl extends BaseServiceImpl<PostInfo, Long> implements PostInfoService{

	@Autowired
	private PostInfoMapper postInfoMapper;
	
	
	@Override
	public Map<String, Object> getPostInfoList(Map<String, Object> paramMap) {
		List<Map<String, Object>> listMapInfo = postInfoMapper.getPostInfoList(paramMap);
        Integer count = postInfoMapper.getPostInfoCount(paramMap);
        //分页数据
        Map<String, Object> dataMap = new HashMap<String, Object>();
        dataMap.put("total", count);
        dataMap.put("rows", listMapInfo);
        return dataMap;
	}
	
}